package com.zjw.zy.heart.wbsocket.socket;


import com.zjw.zy.heart.domain.User;
import com.zjw.zy.heart.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class WsChecker {


    private IUserService service;

    public boolean checkConnect(String username) {
        User user = service.queryUser(username);

        return user != null;
    }

    @Autowired
    public void setService(IUserService service) {
        this.service = service;
    }
}
